package nacos

import (
	"gitee.com/fanshuaiself/wss-gateway/constants"
	"github.com/nacos-group/nacos-sdk-go/model"
)

var (
	client *nacosClient
)
func InitNacos(config *constants.Config) {
	client = newClient(config)
}

func Register(up bool) {
	client.Redister(up)
} 

func DeRegister() {
	client.Deregister()
}

func GetAllServices() map[string]model.Service {
	return client.GetAllServices()
}

func GetConfig(dataId, groupId string) (string, error) {
	return client.GetConfig(dataId, groupId)
}